//
//  SecondViewController.m
//  10-10
//
//  Created by 钟纪旺 on 16/10/10.
//  Copyright © 2016年 zjw. All rights reserved.
//

#import "SecondViewController.h"
#import "Leftchat.h"
#import "OpchatTableViewCell.h"
@interface SecondViewController ()

@end

@implementation SecondViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view, typically from a nib.
    self.tableView.rowHeight = UITableViewAutomaticDimension;
    self.tableView.estimatedRowHeight = 22;
    //self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithCustomView:[[UIImageView alloc] initWithImage:[UIImage imageNamed:@"行政主管"]]];
    
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
    
    return 2;
    
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
    if (indexPath.row %2 == 0) {
        
    
    
    Leftchat * cell = [tableView dequeueReusableCellWithIdentifier: @"zhong" forIndexPath:indexPath];
    cell.bubble.image = [cell.bubble.image resizableImageWithCapInsets:UIEdgeInsetsMake(60, 30, 15, 30)];
    cell.label.text = @"厉害呢 我的哥";
    return cell;
    
    }else{
        OpchatTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"long" forIndexPath:indexPath];
        cell.bubble.image = [cell.bubble.image resizableImageWithCapInsets:UIEdgeInsetsMake(60, 30, 15, 30)];
        cell.label.text =@"承让了 我的弟";
        return cell;
    
    
    
    }
}
@end
